<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>批次管理</title>
    <link th:href="@{/layui/css/layui.css}" rel="stylesheet" />
    <style type="text/css">
        table{
            width: 90%; font-size: 16px;text-align: center;margin: 0 auto;
            border-collapse: separate;border-spacing: 0;border: 2px #e0e0e0;
            margin-top: 20px;
        }
        td {
            border-bottom: 2px solid #eaeaea;
        }
        .tr1{
            background: #efefef;font-size: 14px;height:50px;
        }
        .tr2{
            height: 60px;border-bottom: 2px solid #eaeaea;font-size: 13px;
        }
        a{
            color: #00c0ef;
        }
        .padding{
            margin-bottom: 11px;
        }
        h1{
            text-align: center;
            padding-bottom: 15px;
        }
        .writeBatch{
            margin-left: 20px;
            margin-bottom: 20px;
            height: 30px;
            width: 100px;
            border: none;
            background-color: rgb(27, 172, 111);
            color: white;
            border-radius: 4px;
        }
        .padding1{
            margin-left: 50px;
        }
        select{
            width: 150px;
            height: 30px;
            float: left;
            border-radius: 3px;
            border-color: rgb(224, 224, 224);
            border-style: solid;
            border-width: 1px;
            text-indent: 5px;
            margin-left: 10px;
        }
        .selectButton{
            float: left;
            margin-left: 10px;
            height: 30px;
            width: 70px;
            border: none;
            background-color: rgb(22, 155, 213);
            color: white;

        }
    </style>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <!-- header -->
    <div th:replace="~{commons/header::header}"></div>
    <!-- left -->
    <div th:replace="~{commons/left::left}"></div>
    <!-- 内容主体区域 -->
    <div class="layui-body">
        <div style="padding: 30px 30px ;">
            <div class="padding">
                <h1>批次管理</h1>
            </div>
            <div class="padding1">
                <form action="/staff_select_batch" method="post">
                <select name="batchTeam" >
                    <option value="---请选择用工批次---">---请选择用工批次---</option>
                    <option th:each="teamList:${teamList}" th:text="${teamList.getBatchTeam()}"></option>
                </select>

               <!-- <select id="addProductId2" name="addProductId" class="form-control">
                    <option value="">---请选择用工开始时间---</option>
                </select>

                <select>
                    <option value="">---请选择用工结束时间---</option>
                </select>
                -->
                <select name="state">
                    <option value="">---请选择状态---</option>
                    <option value ="0">开启</option>
                    <option value ="1">关闭</option>

                </select>
                    <input type="submit" value="查询" class="selectButton">
                </form>
            </div>
            <div class="padding">
                <a href="/to_hw_staff_writeBatch"><button class="writeBatch">批次填写</button></a>
            </div>
            <div class="padding">
                <table  >
                    <thead>
                    <tr class="tr1">
                        <th>序号</th>
                        <th>用工批次</th>
                        <th>需求报送开始时间</th>
                        <th>需求报送结束时间</th>
                        <th>用工有效开始时间</th>
                        <th>用工有效结束时间</th>
                        <th>工时提交日期</th>
                        <th>状态</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr  th:each="HwBatchList:${HwBatchList}" class="tr2">
                        <td th:text="${HwBatchList.getBatchNum()}"></td>
                        <td th:text="${HwBatchList.getBatchTeam()}"> </td>
                        <td th:text="${HwBatchList.getBatchStartTime()}"></td>
                        <td th:text="${HwBatchList.getBatchEndTime()}"> </td>
                        <td th:text="${HwBatchList.getBatchApplyStartTime()}"></td>
                        <td th:text="${HwBatchList.getBatchApplyEndTime()}"> </td>
                        <td th:text="${HwBatchList.getBatchWriteTime()}"> </td>

                        <td th:if="${HwBatchList.getBatchState()}==0">开启 </td>
                        <td th:if="${HwBatchList.getBatchState()}==1">关闭 </td>
                        <td>
                            <a th:href="@{'/hw_staff_batchDetail/'+${HwBatchList.getBatchNum()}}" style="color: #00b4ef">详情</a>|
                            <a th:href="@{'/to_hw_staff_batchUpdate/'+${HwBatchList.getBatchNum()}}" style="color: green">修改</a>|
                            <a th:href="@{'/hw_staff_batchDelete/'+${HwBatchList.getBatchNum()}}" style="color: red" th:onclick="return del()">删除</a>
                        </td>
                    </tr>

                    </tbody>
                </table>
                <div class="modal-footer no-margin-top">
                    <div class="col-md-6" style="float: left;margin-top: 15px; margin-left: 400px;">
                        当前第 [[${pageInfo.pageNum}]]页,共 [[${pageInfo.pages}]] 页.一共 [[${pageInfo.total}]] 条记录
                    </div>

                    <ul class="pagination pull-right no-margin">
                        <li th:if="${pageInfo.hasPreviousPage}" style="float: left;margin-top: 15px;margin-left: 10px;">
                            <a th:href="'/hw_staff_batch?pageNum=1'" style="margin-left: 15px;color: #1e9fff;">首页</a>
                        </li>

                        <li class="prev" th:if="${pageInfo.hasPreviousPage}" style="float: left;margin-top: 15px;margin-left: 10px;">
                            <a th:href="'/hw_staff_batch?pageNum='+${pageInfo.prePage}" style="margin-left: 15px;color: #1e9fff;">
                                <i class="ace-icon fa fa-angle-double-left">上一页</i>
                            </a>
                        </li>
                        <!--遍历条数-->
                        <li th:each="nav:${pageInfo.navigatepageNums}" style="float: left;margin-top: 15px;margin-left: 10px;">
                            <a th:href="'/hw_staff_batch?pageNum='+${nav}" th:text="${nav}" th:if="${nav != pageInfo.pageNum}"
                               style="margin-left: 15px;color: #1e9fff;"></a>
                            <span style="font-weight: bold;background: #6faed9;" th:if="${nav == pageInfo.pageNum}" th:text="${nav}" ></span>
                        </li>

                        <li class="next" th:if="${pageInfo.hasNextPage}" style="float: left;margin-top: 15px;margin-left: 10px;">
                            <a th:href="'/hw_staff_batch?pageNum='+${pageInfo.nextPage}" style="margin-left: 15px;color: #1e9fff;">
                                <i class="ace-icon fa fa-angle-double-right">下一页</i>
                            </a>
                        </li>

                        <li style="float: left;margin-top: 15px;margin-left: 10px;">
                            <a th:href="'/hw_staff_batch?pageNum='+${pageInfo.pages}" style="margin-left: 15px;color: #1e9fff;">尾页</a>
                        </li>
                    </ul>
                </div>


            </div>
            </div>
        </div>
    </div>
</div>
<script th:src="@{/layui/layui.js}"></script>
<script>
    //JavaScript代码区域
    layui.use('element', function() {
        var element = layui.element;
    });
    function del(){
        if(!confirm("确认要删除？")){
            window.event.returnValue = false;
        }
    }
</script>
</body>
</html>